﻿var top_frame="130,*";
var strColumns_Current = "50,*";
function showfull() {
	if ((top.all.cols!="0,*") || (top.main.rows != "0,*")){
		strColumns_Current1 = top.main.rows;
		top_frame1=top.all.cols;
		top.all.cols="0,*";
		top.main.rows = "0,*";
	}else{
		top.all.cols=top_frame;
		top.main.rows = strColumns_Current;
	}
}
function showtop() {
	if (top.main.rows != "0,*"){
		strColumns_Current = top.main.rows;
		top.all.cols=top_frame;
		top.main.rows = "0,*";
	}else{
		top.all.cols=top_frame;
		top.main.rows = strColumns_Current;
	}
}
/*
function showleft() {
	if (top.all.cols !="0,*"){
		top_frame = top.all.cols;
		top.all.cols="0,*";
		top.main.rows = strColumns_Current;
	}else{
		top.all.cols=top_frame;
		top.main.rows = strColumns_Current;
	}
}
*/
function showleft() {
	divColl = document.all.tags("DIV");
	if (top.all.cols !="0,*"){
		top_frame = top.all.cols;
		top.all.cols="0,*";
		top.main.rows = strColumns_Current;
		for (i=1; i<divColl.length; i++){
            whichEl = divColl(i);
			if (whichEl.id == "div2" || whichEl.id == "DIV2")
				if (screen.height=="600")
				{
					whichEl.style.width = 790;
					div1.style.width=774;
				}else{
					whichEl.style.width = 1014;
					div1.style.width=998;
				}
		}
	}else{
		top.all.cols=top_frame;
		top.main.rows = strColumns_Current;
		for (i=1; i<divColl.length; i++){
            whichEl = divColl(i);
            if (whichEl.id == "div2" || whichEl.id == "DIV2") 
				if (screen.height=="600")
				{
					whichEl.style.width = 660;
					div1.style.width=644;
				}else{
					whichEl.style.width = 884;
					div1.style.width=868;
				}
		}
	}
}
function mout(thethis){
	if (thethis.style.backgroundColor!="red"){
		thethis.style.backgroundColor="";
	}
function mclick(thethis){
	for (i=0;i<document.links.length;i++)
	{
		document.links[i].style.backgroundColor=""
		document.links[i].style.color="";
		//alert(i)
	}
	thethis.style.backgroundColor="#000000";
	thethis.style.color="#FFFFFF";
}
}
function movermain(thethis){
	thethis.style.backgroundColor="#FBE8C0";
}
function radiotrue(names){
	obj=eval("document.forms[0]."+ names);
	obj.checked=true;
}
function checktrue(names){
	obj=eval("document.forms[0]." + names);
	if (obj.checked==true){
		obj.checked=false;
	}else{
		obj.checked=true;
	}
}

function set_contentleft_height(heightvalue,widthvalue){
	if (screen.height!="600"){
		div2.style.height=heightvalue;
	  div1.style.width=widthvalue-16;
		div2.style.width=widthvalue;
	}
}

function set_contentleft_height2(heightvalue,widthvalue){
	if (screen.height!="600"){
		div2.style.height=heightvalue;
		div2.style.width=widthvalue;
	}
}

function set_contentleft_height1(heightvalue){
	if (screen.height!="600"){
		div2.style.height=heightvalue;
	}
}

function showstatus(status){
	window.status=status;
	return true;
}

function menust(imgname){
	for (i=0;i<document.images.length;i++ )	{
		if (document.images[i].name.length>0)
		{
			document.images[i].src="../../images/cn/"+ document.images[i].name +"1.gif"
		}
	}
	obj=eval("document."+imgname)
	obj.src="../../images/cn/"+ imgname +".gif"
}

function menust1(imgname){
	for (i=0;i<document.images.length;i++ )	{
		if (document.images[i].name.length>0)
		{
			document.images[i].src="../../images/cn/"+ document.images[i].name +"1.gif"
		}
	}
	obj=eval("document."+imgname)
	obj.src="../images/cn/"+ imgname +".gif"
}

function isCharsInBag (s, bag){  
  var i;
  for (i = 0; i < s.length; i++){   
      var c = s.charAt(i);
      if (bag.indexOf(c) == -1) return false;
  }
  return true;
}
function add(objname){
	obj=eval("document.forms[0]."+objname)
	if (isCharsInBag(obj.value,"0123456789")){
		temp=Math.round(obj.value)
		obj.value=temp+1
	}else{
		alert("请填写整数!")
		obj.focus()
	}	
}
function reduce(objname){
	obj=eval("document.forms[0]."+objname)
	if (isCharsInBag(obj.value,"0123456789")){
		temp=Math.round(obj.value)
		if (temp>0){
			obj.value=temp-1
		}
	}else{
		alert("请填写整数!")
		obj.focus()
	}
}

function mclick(obj){
  if(document.form1!=null){
	if (document.form1.modify1!=null){
		for (i=0;i<document.form1.modify1.length;i++){
			document.form1.modify1[i].className="grayinput-number"
			//alert(document.form1.modify[i].className)
		}
	}	
	if (document.form1.modif1!=null){
		if (document.form1.modif1.length>1){
			for (j=0;j<document.form1.modif1.length;j++){
				document.form1.modif1[j].className="grayinput"
				//alert(document.form1.modif1[j].className)
			}
		}else{
			document.form1.modif1.className="grayinput"
		}
	}
	if (document.form1.modify2!=null){
		for (i=0;i<document.form1.modify2.length;i++){
			document.form1.modify2[i].className="whiteinput-number"
			//alert(document.form1.modify[i].className)
		}
	}
	if (document.form1.modif2!=null){
		if (document.form1.modif2.length>1){
			for (j=0;j<document.form1.modif2.length;j++){
				document.form1.modif2[j].className="whiteinput"
				//alert(document.form1.modif2[j].className)
			}
		}else{
			document.form1.modif2.className="whiteinput"
		}
	}
 }
	obj.className="none"
}
function dclick(){
	if (document.form1.modify1!=null){
		for (i=0;i<document.form1.modify1.length;i++){
			document.form1.modify1[i].className="grayinput-number"
			//alert(document.form1.modify[i].className)
		}
	}	
	if (document.form1.modif1!=null){
		if (document.form1.modif1.length>1){
			for (j=0;j<document.form1.modif1.length;j++){
				document.form1.modif1[j].className="grayinput"
				//alert(document.form1.modif1[j].className)
			}
		}else{
			document.form1.modif1.className="grayinput"
		}
	}
	if (document.form1.modify2!=null){
		for (i=0;i<document.form1.modify2.length;i++){
			document.form1.modify2[i].className="whiteinput-number"
			//alert(document.form1.modify[i].className)
		}
	}
	if (document.form1.modif2!=null){
		if (document.form1.modif2.length>1){
			for (j=0;j<document.form1.modif2.length;j++){
				document.form1.modif2[j].className="whiteinput"
				//alert(document.form1.modif2[j].className)
			}
		}else{
			document.form1.modif2.className="whiteinput"
		}
	}
	//obj.className="none"
}

function gotourl(url){
	top.location.href=url
}
function Surl(urls)
{
window.location.href=urls
}
function ParentSurl(urls)
{
parent.location.href=urls
}
function betlink(sClass, vValue)
{
	ccs=form1.trname.value;
	trs=form1.sclassnamea.value;
	ccs1=eval(ccs);
	ccs1.className=trs;
	document.form1.sclassnamea.value = sClass;
	document.form1.trname.value = vValue;
}
function page_actiondown(action)
{
    parent.down.location.href = action;
}

var now = new Date();
	var year = now.getYear();
	var month = now.getMonth() + 1;
	var date = now.getDate();

var dateValue = "";
	dateValue += year + "-";
	dateValue += ((month < 10) ? "0" : "") + month + "-";
	dateValue += date;
	
var timerID = null
var timerRunning = false
function MakeArray(size) {
	this.length = size;
	for(var i = 1; i <= size; i++)
		{
			this[i] = "";
		}
	return this;
}

var now = new Date();
	var year = now.getYear();
	var month = now.getMonth() + 1;
	var date = now.getDate();
var day = now.getDay();
	Day = new MakeArray(7);
	Day[0]="星期天";
	Day[1]="星期一";
	Day[2]="星期二";
	Day[3]="星期三";
	Day[4]="星期四";
	Day[5]="星期五";
	Day[6]="星期六";
var dateValue = "";
	dateValue += year + "-";
	dateValue += ((month < 10) ? "0" : "") + month + "-";
	dateValue += date + "  ";
	//dateValue += (Day[day]) + "  ";

function stopclock (){
	if(timerRunning)
		clearTimeout(timerID);
	timerRunning = false
}
function showtime () {
	var now = new Date();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	//var timeValue = hours+8;
	var timeValue = hours
	if (timeValue>=24){
		timeValue=timeValue-24;
	}
	//timeValue += ((hours <= 12) ? hours : hours - 12);
	//timeValue += ;
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
	timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
	//timeValue += (hours < 12) ? "上午" : "下午";
	document.all.face.value = timeValue;
	timerID = setTimeout("showtime()",1000);
	timerRunning = true
}
function startclock () {
	stopclock();
	showtime();
}             	
	
	
	
function PopOpen(filename,ISheight,ISwidth,openname)
{
  if (openname='')
  {
  openname='newwindow'  
  }
   window.open(filename, openname, "height="+ISheight+", width="+ISwidth+",top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no")
}

//by andyyang 2003-5-23 13:29
var tempObj = null;
function switchTags(obj,tempObj1)
{  
  obj.className="clickred";
	if(tempObj!=null && tempObj!=obj)
	{
	  tempObj.className="hand1";	  
	}else if(tempObj1!=null&&tempObj1!=obj)
	{
	  tempObj1.className="hand1";
	}
	tempObj  = obj;
}

//by CarrieYe 2006-06-16,add 4 OrgSelect.jsp( function setError() ) Use
   function setClean(){}
   function setClean2(){}

